package com.stagewebserver.webserver.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.stagecommon.common.pojo.Likes;
import com.stagecommon.common.vo.LikesVo;
import org.apache.ibatis.annotations.MapKey;

import java.util.List;
import java.util.Map;

public interface LikesMapper extends BaseMapper<Likes> {
    Likes selectByObjIdAndUserId(Long objId, Long userId, Byte type);

    @MapKey("type")
    List<Map<String, Object>> selectLikesInfoByType(Byte type);

    Likes selectLike(Long objId, Long userId, Byte type);

    Long selectId(Long objId, Long userId, Byte type);

    List<LikesVo> selectWorksByLike(Long userId);
}
